home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 19
/
Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso
/
Aminet
/
comm
/
cnet
/
revive.lha
/
revive
/
ReVive
next >
Wrap
Text File
|
1997-04-05
|
11KB
|
179 lines
/**************************************************************************\
$VER: ReVive, v3.02 (5-Apr-97) by Dotoran!
\**************************************************************************/
options results;signal on SYNTAX;signal on ERROR;signal on IOERR;call IERROR
a=sourceline(2);parse var a . ", "ver" ("vdate")" .
tr=transmit;se=sendstring;gc=getchar;gu=getuser;gs=getscratch;call RSDATA
a="rexxsupport.library";if ~show("l",a) then if ~addlib(a,0,-30) then exit
parse source . . fp .;df=left(fp,max(lastpos('/',fp),lastpos(':',fp)))
users2="DH0:ReVive/"
/* Path to create/store the "users2/" directory. This path
needs to END with either a slash (/) or a colon (:). It
is HIGHLY RECOMMENDED this location be on a different
PHYSICAL drive than that which houses your MAIL:USERS/
directory for maximum benefit of ReVival ability! */
START:
gu 2400088;acts=result;gu 1202244;args=result-1;zz="00"x;changewhere "Playing God!"
if args>0 then do;a="";do i=0 to args-1;gu 1302307+(i*61);a=a||result" ";end i
tot=PARSE(a,1,acts);signal REVIVE2;end
call TITLE;se "n1c6Want Instructions? c7[cbNoc7]c9: ";gc;a=result
if a="Y" then do;tr "caYesc6!";signal DOCS;end;else tr "cbNoc6."
REVIVE:
se "n1cbReVive c6Which cbID c6Numberc7(c6sc7)c6? c7[caSc6=caScanc6/cdQc6=cdQuitc7]c9: cbi0 30}"
gu 70;a=result;if (upper(a)="Q"|a=""|a<1|a>acts)&upper(a)~="S" then exit
if upper(a)="S" then a="";tot=PARSE(a,1,acts)
if tot=0 then do;se "n1c6Scanningc9: c7[cd0000c7]<5";tot=0;it.=""
do i=1 to acts;loadscratch i;st=result;savescratch (-i)
getscratch 1;handle=result;se "cd"right("cb"i,7,"0")"<4"
if handle="!" then do;tot=tot+1;it.tot=i;it.0=it.0" "it.tot;end
end i;tr ">6c9Finishedc6!"
if tot=0 then tr "n1c9No c9Deleted c6Accounts Found!"
else tr "n1c9Deleted cbID c6Numbersc9: cb"it.0
signal REVIVE;end
REVIVE2:
pointers=0
do i=1 to tot
tr "f1caAttempting c6to cbReVive cfID # cc: ca"it.i
/**/;z=forbid()
call open(f1,df"ReViveDB","r")
index=((it.i*38)-38)+4 ; call seek(f1,index,"b")
uid=translate(strip(readch(f1,4),"t",zz),reverse(bb),bb)
handle=translate(strip(readch(f1,20),"t",zz),reverse(bb),bb)
password=translate(strip(readch(f1,14),"t",zz),reverse(bb),bb)
call close(f1)
/**/;z=permit()
if handle="!" then handle="REVIVE"it.i
if password=d2c(1) then password="REVIVE"it.i
if uid="SID" then uid=it.i
loadscratch it.i;getscratch 1;handle2=result
getscratch 3;realname=result;getscratch 6;street=result
getscratch 4;citystate=result;getscratch 5;zipcode=result
getscratch 9;voice=result;getscratch 10;data=result
getscratch 11;lastcall=result;getscratch 39;maildir=result
getuser 1100000;year=result;getuser 1100001;month=result
getuser 1100002;day=result
if handle2~="!" then do
tr "n1c6This is c9NOT c6a cbdeleted c6account!n1"
tr "c6User's Handle c9: ca"handle2
tr "c6User's Real Name c9: cb"realname
tr "c6User's Password c9: cd"password
tr "n1c7Press cdany key c7now...g1"
savescratch (-it.i);iterate i;end
tr "n1r1caData Found Inside Account r0cc:n1"
tr "c2 User's Real Name cc: c2"realname
tr "ca Street Address cc: ca"street
tr "c2 City, State Zip cc: c2"citystate" "zipcode
tr "ca Voice Phone Number cc: ca"voice
tr "c2 Data Phone Number cc: c2"data
tr "ca Last Call Date/Time cc: ca"lastcall
tr "n1r1cbData From ReVive Database r0cc:n1"
tr "cd Unique Serial Number cc: cd"uid
tr "c5 User's Handle cc: c5"handle
tr "cd User's Password cc: cd"password
se "n1 c6If the data from the cadatabase c6coincides with the existing "
se "data in the cbactual user accountc6, then it's caOK c6to cbReVive c6this "
se "account, but if the data in the account does c9NOT c6reflect the "
se "cfproper c6data for the c9DELETED c6user, then you should c9NOT c6attempt "
tr "to cbReVive c6this account.n1@4"
se "c6Should I cbReVive c6this account now? c7[cbNoc7]c9: ";gc;a=result
if a~="Y" then do;tr "cbNoc6.";savescratch (-it.i);iterate i;end
se "caYesc6, cbReVivingc6...";pointers=1
address command "makedir mail:users/"maildir
setobject handle;putscratch 1
setobject password;putscratch 2
setobject uid;putscratch 41
setobject year;putscratch 1101094
setobject month;putscratch 1101095
setobject day;putscratch 1101096
savescratch it.i;tr "h6cbedc6!"
inuse=inuse+1;call SSDATA
if exists(users2"users2/"maildir) then do
se "n1cbReVive ca"handle"'s ceUUCP Mail Directory c6too? c7[caYesc7]c9: "
gc;a=result;if a="N" then tr "cbNoc6.";else do;se "caYesc6, cbReVivingc6..."
address command "copy "users2"users2/"maildir"/ mail:users/"maildir"/ all"
tr "h6cbedc6!";end;end
end i
logentry "cbReVived "handle"'s Account...q1" ; if pointers=0 then exit
se "n1 c6To finish up, it will be necessary to run the caPOINTERS c6program "
tr "to cdreactivate c6the cbReVived ceHandles c6used...n1"
fp="doors:pointers";addkeys (fp)
se "c6Enter cfpath c6to cbPointers c6filec9: r1cai0 50}r0c9";gu 70;fp=result
if ~exists(fp) then do;se "n1c6I was c9NOT c6able to locate the file cf`ca"fp"cf'c6... You'll have to run "
se "it manually. Do so c9right nowc6, else your system won't recognize the "
tr "cbReVived c6handle(s) until such a time as you cfDO c6run cbPointersc6!";exit;end
tr "#2 "fp"}n1cbReViving c6is cacompletec6!"
exit
PARSE: procedure expose it.; arg rng,min,max
it.='';c=0;it=translate(rng,' ','.,')
do a=1 to words(it);c=c+1;it.c=word(it,a)
if index(it.c,'-')>0 then do;parse var it.c x'-'y
if y='' then y=max;if x='' then x=min
if x>y then do;d=x;x=y;y=d;end
if x<min|y>max|~datatype(x,'W')|~datatype(y,'W') then do;c=c-1;iterate;end
do b=x to y;it.c=b;c=c+1;end;c=c-1;end
else if it.c<min|it.c>max|~datatype(it.c,'W') then do;c=c-1;iterate;end;end
do i=1 to c;it.0=it.0||it.i' ';end
return c
TITLE:;tr 'f1
ÀÄ¿'
tr ' À¿ ÚÄ¿ ÚÄÄ¿C
ÛßßßÜCÛ Û ÜCÜßßßÜ ÜßßßÜ ÜßßßÜ'
tr '
ÚÄÄÙ ³ ÀÄÄÄÙÚÄÁ¿C
ÛÜÜÜß ÜßßÜ Û Û Ü Û Û ÜßßÜCÜÜß Û Û ÜÜß'
tr '
ÀÄ¿ ÚÙ
ÜÜÛÛ
Û
³
ÜÜ
À¿
Û Û Ûßß Û Û Û ßÜ Üß ÛßßCÜ Û Û Û Üß'
tr '
³ ³
ÛÛß
À
ßÛÛ
Ù
ß ß ßßß ßß ß ß ßßßCßßß ß ßßß ßßßßß'
tr '
ÚÙÚÙ
ÛÛC
ÛÛ
Ûß
ßß
ßß
ßß
ßß
ßß
ßß
ßß
ßß
ßß
ßß
ßß
ßß
ßß
ßß
ßß
ßß
ßß
ßß
ßß
ßß
ßß
ßß
ßß
ßß
ßß
ßß
ßß
ßÛ'
tr '
³ ³
ßÛÛ
ÜÜ
ÜÜ
ÛÛß
Û
Another
lifesaving utility
from
Dotoran
of
Frontiers
Û'
tr ' ÀÄÙC
ßß
ßßC
ÛÜ
ÜÜ
ÜÜ
ÜÜ
ÜÜ
ÜÜ
ÜÜ
ÜÜ
ÜÜ
ÜÜ
ÜÜ
ÜÜ
ÜÜ
ÜÜ
ÜÜ
ÜÜ
ÜÜ
ÜÜ
ÜÜ
ÜÜ
ÜÜ
ÜÜ
ÜÜ
ÜÜ
ÜÜ
ÜÜ
ÜÜ
ÜÜ
ÜÛ
'
return
DOCS:;tr "f1cbReVivec6, cf"ver" cdDocumentation cf- c6Page cb1 c7(c6of cb2c7)n1"
se "c6 When a user account is c9deleted c6in caCNet Amiga, v3.05c c6or cav4.26bc6, it's not "
tr "caactually c9deletedc6, but cbslightly modifiedc6.n1"
se " There are cdfour c6major pieces of information that are c9LOST c6during "
se "this processc9: caunique serial id numberc6, cbuser handlec6, cduser passwordc6, "
tr "and the ceuser's uucp mail directoryc6.n1"
se " cbReVivec6, cf"ver" c6keeps a constantly updated cadatabase c6containing the "
se "first cathree c6pieces of information listed above, so that if you ever "
se "wish to cd`cbrevivecd' c6one of these c9deleted c6accounts, you'll have copies "
se "of the camost recent information c6from these accounts to recreate the "
se "user account with. A new ceuucp mail directory c6will also be created "
se "for this user, as well as their cdlast call date c6being updated to "
tr "reflect the cfcurrent datec6.n1"
se " Starting with cfv2.20c6, it is possible to specify cfranges c6"
se "of id numbers you wish to cd`cbrevivecd'c6, so you may wish to initially hit "
se "your caENTER c6key to scan ceALL c6user accounts, then review each c9deleted c6"
tr "account to see if it should be cd`cbrevivedcd' c6or not.n1"
se "c7Press ccany key c7to continue...g1"
tr "f1cbReVivec6, cf"ver" cdDocumentation cf- c6Page cb2 c7(c6of cb2c7)n1"
se "c6 Also starting with cfv2.20c6, the caneed to directly modify c6the "
se "values stored in the cd`cebbs.sdatacd' c6file is c9NOT c6needed. Because of "
se "this, it is cfno longer neccessary c6for you to reboot the computer "
tr "after reviving user accounts.n1"
se " If enabled, you may also be asked if you wish to cd`cbrevivecd' c6a "
se "user's ceuucp directory's cfCONTENTS c6from a backup as well. Presently, "
se "an cbexact duplicate c6of your cd`cbmail:users/cd' c6directory can be maintained "
se "in your cd`ce"users2"cd' c6directory which contains the camost up to date c6"
tr "contents of said directories.n1"
tr "c7Press ccany key c7to start cbReVivec7, cf"ver"c7...g1"
signal REVIVE
RSDATA:;call open(f1,"SysData:bbs.sdata","r")
do i=1 to 5;vd.i=c2d(readch(f1,4));end i;call close(f1);inuse=vd.2;return
SSDATA:;vd.2=inuse;setobject vd.2;putuser 2400092
call open(f2,"SysData:bbs.sdata","w");do ii=1 to 5
call writech(f2,d2c(vd.ii,4));end ii;call close(f2);return
IERROR:;bb="`~!@#$%^&*()_-+=|\abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ[]{};':"d2c(34)",./<>?";return
SYNTAX:;ERROR:;IOERR:;e1="n1 Error: "rc" ("errortext(rc)")"
e2=" Line: "left(sigl,4)"File:";c="`"fp", "ver"'";e2=e2" "c;tr e1;tr e2
logentry e1;logentry e2;e=strip(translate(sourceline(sigl),"\{",""))
do while e~="";e3="Source: "left(e,37);tr e3;logentry e3;e=substr(e,38);end
bufferflush;exit
/**************************************************************************\
\****************************************** Frontiers BBS (716)/823-9892 **/